<template>
	<div class="conbox problemDetail">
			<!-- <div class="detail_title" v-html="content"></div> -->
            <!-- <rich-text class="detail_title" :nodes="content"></rich-text> -->
            <u-parse :content="content" noData="暂无数据" className="content_box" :imageProp="imageProp"></u-parse>
	</div>
</template>

<script>
import { getProblemDetail } from '@/api/center'
import uParse from '@/components/u-parse/u-parse'
export default {
	name: 'ProblemDetail',
	components: {
		uParse
	},
	data() {
		return {
			content: '',
			imageProp: {
				mode: 'widthFix',
				lazyLoad: true,
				padding: 40
			}
		}
	},
	onLoad(option) {
		const params = {
			article_id: option.id
		}
		getProblemDetail(params).then(res => {
			uni.setNavigationBarTitle({
				title: res.data.title || '常见问题'
			})
			this.content = res.data.content
		})
	}
}
</script>

<style scoped lang="scss">
    @import url("../../../components/u-parse/u-parse.css");
	.conbox {
		padding: 40px 20px 20px ;
		background-color: #fff;
	}
	.content_box {
        // padding: 0 40px;
        box-sizing: border-box;
        max-width: 100vw;
        // view,div,p,text,span{
        //     text-indent: 40px;
        // }
        // padding: 0 40px;
		// padding-left: 30px;
		.text {
			text-indent: 40px;
		}
	}
	.detail_title {
		font-size: 30px;
		color: rgba(51, 51, 51, 1);
		line-height: 1;
		line-height: 40px;
    }
</style>
